//
//  LunBoDetailViewController.m
//  Protect -A
//
//  Created by 付剑英 on 16/6/25.
//  Copyright © 2016年 付剑英. All rights reserved.
//

#import "LunBoDetailViewController.h"

@interface LunBoDetailViewController ()<UIWebViewDelegate>
@property (nonatomic,retain)UIWebView *wb;
@end

@implementation LunBoDetailViewController

#pragma mark - ------------ 内存管理 ---------------
-(void)dealloc{
  
    [_wb release];
    [_url release];
    [super dealloc];

}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self create];
    // Do any additional setup after loading the view.
}

#pragma mark - ------------ 创建webview ---------------

-(void)create{
  
    self.wb  = [[UIWebView alloc]initWithFrame:CGRectMake(0, -50, self.view.frame.size.width, self.view.frame.size.height +50)];
    self.wb.delegate = self;
    [self.view addSubview:self.wb];
    NSURL *url1 = [NSURL URLWithString:_url];
    
    NSURLRequest *quest = [NSURLRequest requestWithURL:url1];
    
    [self.wb loadRequest:quest];
    
    [_wb release];

}

-(void)viewWillAppear:(BOOL)animated{
 
    self.tabBarController.tabBar.hidden = YES;

}

-(void)viewWillDisappear:(BOOL)animated{

    self.tabBarController.tabBar.hidden = NO;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
